package com.pingan.haofang.searchcloud.common.configuration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @author EX-LIUXIANWEN001
 * @date 2018/10/24
 * @since 1.0.0
 */
@Component
@ConfigurationProperties(prefix = "searchcloud.nodedashboard")
public class ClusterNodeProperties {

    private List<ClusterNodeInfo> nodes = new ArrayList<>();

    public List<ClusterNodeInfo> getNodes() {
        return nodes;
    }

    public void setNodes(List<ClusterNodeInfo> nodes) {
        this.nodes = nodes;
    }

    public static class ClusterNodeInfo {
            private long diskSize;
            private String clusterName;
            private String host;

        public long getDiskSize() {
            return diskSize;
        }

        public void setDiskSize(long diskSize) {
            this.diskSize = diskSize;
        }

        public String getClusterName() {
            return clusterName;
        }

        public void setClusterName(String clusterName) {
            this.clusterName = clusterName;
        }

        public String getHost() {
            return host;
        }

        public void setHost(String host) {
            this.host = host;
        }
    }

}
